home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambmaze1end.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  91 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbMaze1End.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        entered
  16.     message     pulse
  17.  
  18.     thing        soundPos0        nolink
  19.     thing        soundPos1        nolink
  20.     thing        soundPos2        nolink
  21.     thing        soundPos3        nolink
  22.     thing        soundPos4        nolink
  23.     thing        soundPos5        nolink
  24.     thing        soundPos6        nolink
  25.     thing        soundPos7        nolink
  26.     thing        soundPos8        nolink
  27.     
  28.     sector      start_Amb1      linkID=1
  29.     
  30.     sector      stop_Amb1       linkID=0
  31.     sector      stop_Amb2       linkID=0
  32.     
  33.     sound        ambient0=shw_amb1.wav   local
  34.     sound        ambient1=shw_amb2.wav   local
  35.     sound        ambient2=shw_amb3.wav   local
  36.     sound        ambient3=shw_amb4.wav   local
  37.     sound        ambient4=shw_amb5.wav   local
  38.     sound        ambient5=shw_amb6.wav   local
  39.     sound        ambient6=shw_amb7.wav   local
  40.     
  41.     template    tpl_Snow=skitosnow      local
  42.     
  43.     int         playing=0               local
  44.     
  45. end
  46.  
  47. # ========================================================================================
  48.  
  49. code
  50.  
  51. entered:
  52.  
  53.     if((GetSenderID() == 1) && (playing == 0))
  54.     {
  55.         playing = 1;
  56.         setpulse(2.0);
  57.     }
  58.     
  59.     if(GetSenderID() == 0)
  60.     {
  61.         playing = 0;
  62.         SetPulse(0.0);
  63.     }
  64.     
  65.     return;
  66.  
  67. # ========================================================================================
  68.  
  69. pulse:
  70.  
  71.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 8)], 1.0, 15, 30, 0);
  72.     
  73.     if(GetPerformanceLevel() >= 2)
  74.     {
  75.         CreateThing(tpl_Snow, soundPos0);        
  76.         CreateThing(tpl_Snow, soundPos1);        
  77.         CreateThing(tpl_Snow, soundPos2);        
  78.         CreateThing(tpl_Snow, soundPos3);        
  79.         CreateThing(tpl_Snow, soundPos4);
  80.         CreateThing(tpl_Snow, soundPos5);
  81.         CreateThing(tpl_Snow, soundPos6);
  82.         CreateThing(tpl_Snow, soundPos7);
  83.         CreateThing(tpl_Snow, soundPos8);
  84.     }
  85.     
  86.     return;
  87.  
  88. # ========================================================================================
  89.  
  90. end
  91.